<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <#assign base=request.contextPath  />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/frame/layui/layui.all.js"></script>
</head>
<body class="body">
			<table class="layui-hide" id="test" lay-filter="test"></table>
<script type="text/javascript">
layui.use(['laydate','form','table'], function(){
	var laydate = layui.laydate;
 	var form = layui.form
 	var table = layui.table;
  table.render({
    even: true,//开启隔行背景
	size: 'sm',//小尺寸的表格
	elem: '#test',
    toolbar: '#toolbarDemo',
      height:480,
	url: '${base}/caradmin/distributionList',
	title: '用户数据表',
	cols: [[
        {field:'ptname', title: '企业名称',align: 'center'}
        ,{field:'carNumber', title: '车牌号',align:'center'}
     ,{field:'callName', title: '姓名',align:'center'}
      ,{field:'callPhone', title: '联系方式',align: 'center'}
        ,{field:'carModel', title: '车辆型号',align:'center'}
      ,{field:'flag', title: '分配金额',align: 'center'}
      ,{field:'createTime', title: '分配时间',align:'center',templet: function(d){return timeFormat(d.createTime)}}
        ,{field:'moeny', title: '余额',align:'center'}
    ]]
    ,id: 'testReload'
      ,height:480
      ,page: {
          layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
          ,theme: '#9AC747'
          ,limit: 10
      }
  });

});
function timeFormat(nS) {
    return new Date(parseInt(("/Date("+nS+")/").substr(6, 13))).toLocaleDateString();
};
</script>
</body>
</html>